Skip to content

Release automation#1172

Open
gabrielcld2 wants to merge 3 commits into
developfrom
feature/release-automation
Open

Release automation#1172
gabrielcld2 wants to merge 3 commits into
developfrom
feature/release-automation

Conversation

@gabrielcld2
Copy link
Copy Markdown
Collaborator

Deployment process

This is what the production release process will look like from now on:

1. Prepare master branch

This is pretty much as before:

  • prepare all changes in a PR against master
  • this should also include the following:
    • updated version in both .version and package.json
    • updated readme.txt changelog
  • merge the master PR

2 Create and publish GH release

This is also similar to what was done before:

  • Go to the repository on GitHub → Releases → Draft a new release
    • Create a new tag (e.g. 3.3.4) targeting master
    • Set the release title and notes (copy and format the changelog from the readme.txt)
    • Publish as a standard release
    • Note: pre-release can be used to do a dry-run instead which will trigger the workflow but won't push to wp.org's SVN repository.

3. The GH workflow

Publishing the release will automatically trigger .github/workflows/deploy-to-wp-org.yml, which:

  1. Runs the full CI suite to ensure the build isn't broken
  2. Installs npm and Composer dependencies
  3. Builds JS/CSS assets (npm run build)
  4. Copies all plugin files into build/ and update version references (via grunt prepare)
  5. Deploys to WP.org SVN via the 10up action — commits to trunk/, creates tags/<version>/, and updates assets/
  6. Attaches a .zip of the plugin to the GitHub release

QA notes

  • We can try triggering a dry-run by creating a pre-release in GH.

@gabrielcld2 gabrielcld2 changed the title Feature/release automation Release automation May 12, 2026
Copy link
Copy Markdown
Contributor

@PatelUtkarsh PatelUtkarsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some suggestions but overall looks good!


# After the deployment, we also want to create a zip and upload it to the release on GitHub.
- name: Upload release asset
uses: actions/upload-release-asset@v1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 thought: This action is archived and deprecated by GitHub since 2021.

Should we migrate it to more active ones like:

- name: Upload release asset
  uses: softprops/action-gh-release@v2
  with:
    files: ${{ steps.deploy.outputs.zip-path }}


# Install dependencies.
- name: Install NPM dependencies
run: npm install
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 suggestion: In CI we use npm ci we can keep it same here.

Suggested change
run: npm install
run: npm ci


# Build.
- name: Build
run: npm run build
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 suggestion: The release pipeline trusts that the human releaser bumped .version, package.json, and readme.txt to match the tag they're publishing. There's nothing here to fail the build if git tag == "3.3.4" but .version == "3.3.3". Given the PR explicitly notes the human has to remember to update both files, a 5-line sanity check is cheap insurance:

- name: Verify version matches tag
  run: |
    TAG="${GITHUB_REF_NAME#v}"
    FILE_VERSION=$(cat .version | tr -d '[:space:]')
    if [ "$TAG" != "$FILE_VERSION" ]; then
      echo "::error::Tag $TAG does not match .version $FILE_VERSION"
      exit 1
    fi

Comment thread .github/workflows/ci.yml
on:
push:
workflow_call:
pull_request:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 suggestion: With push: and pull_request: and workflow_call: here every PR push fires CI twice (once for the push event on the branch, once for the PR). This isn't introduced by this PR but the workflow_call addition is a good moment to audit. Suggestion (out of scope, but worth a follow-up): scope push: to branches: [develop, master].

runs-on: ubuntu-22.04
permissions:
contents: write
packages: read
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 suggestion: Is this required? if not we can clean it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants